/*
========================================================================
 Name        : SendGoodsContainer.h
 Author      : shitou
 Copyright   : Your copyright notice
 Description : 
========================================================================
*/
#ifndef SENDGOODSCONTAINER_H
#define SENDGOODSCONTAINER_H

// [[[ begin generated region: do not modify [Generated Includes]
#include <coecntrl.h>		
// ]]] end generated region [Generated Includes]
#include "SendGoodsPage.h"
#include "RegExpUtil.h"
#include "MyEdwin.h"
#include "CbaImage.h"
#include "GuiControlFactory.h"
// [[[ begin [Event Handler Includes]
// ]]] end [Event Handler Includes]

// [[[ begin generated region: do not modify [Generated Forward Declarations]
class MEikCommandObserver;		
class CEikLabel;
class CEikRichTextEditor;
class CEikEdwin;
// ]]] end generated region [Generated Forward Declarations]

/**
 * Container class for SendGoodsContainer
 * 
 * @class	CSendGoodsContainer SendGoodsContainer.h
 */
class CSendGoodsContainer : public CCoeControl
	{
public:
	// constructors and destructor
	CSendGoodsContainer();
	static CSendGoodsContainer* NewL( 
		const TRect& aRect, 
		const CCoeControl* aParent, 
		MEikCommandObserver* aCommandObserver );
	static CSendGoodsContainer* NewLC( 
		const TRect& aRect, 
		const CCoeControl* aParent, 
		MEikCommandObserver* aCommandObserver );
	void ConstructL( 
		const TRect& aRect, 
		const CCoeControl* aParent, 
		MEikCommandObserver* aCommandObserver );
	virtual ~CSendGoodsContainer();

public:
	// from base class CCoeControl
	TInt CountComponentControls() const;
	CCoeControl* ComponentControl( TInt aIndex ) const;
	TKeyResponse OfferKeyEventL( 
			const TKeyEvent& aKeyEvent, 
			TEventCode aType );
	void HandleResourceChange( TInt aType );
	void DeliverGoodsSubmit();

public:
	void InitWithPage(CSendGoodsPage* aPage);
	
protected:
	// from base class CCoeControl
	void SizeChanged();

private:
	// from base class CCoeControl
	void Draw( const TRect& aRect ) const;
	
private:
	void SetControlsFocus(TInt aOrder);
	void OpenSelectList();
	
private:
	void InitializeControlsL();
	void LayoutControls();
	CCoeControl* iFocusControl;
	MEikCommandObserver* iCommandObserver;
	// [[[ begin generated region: do not modify [Generated Methods]
public: 
	// ]]] end generated region [Generated Methods]
	
	// [[[ begin generated region: do not modify [Generated Type Declarations]
public: 
	// ]]] end generated region [Generated Type Declarations]
	
	// [[[ begin generated region: do not modify [Generated Instance Variables]
private: 
	CEikLabel* iLabel1;
	CMyEdwin* iAddress;
	CEikLabel* iLabel2;
	CMyEdwin* iMemo;
	CEikLabel* iChoose;
	CEikLabel* iLabel4;
	CEikEdwin* iOddNo;
	CEikLabel* iLabel5;
	// ]]] end generated region [Generated Instance Variables]
private:
	TInt iTabOrder;
	CSendGoodsPage* iPage;
	CCbaImage* iCbaBar;
	CEikImage* iTitleBar;
	// [[[ begin [Overridden Methods]
protected: 
	// ]]] end [Overridden Methods]
	
	
	// [[[ begin [User Handlers]
protected: 
	void SetRichText1FormattingL();
	void SetRichText2FormattingL();
	void SetAdrressEditFormattingL();
	void SetMemoEditFormattingL();
	void SetAdrressFormattingL();
	void SetMemoFormattingL();
	// ]]] end [User Handlers]
	
public: 
	enum TControls
		{
		// [[[ begin generated region: do not modify [Generated Contents]
		EAdrress,
		EMemo,
		EChoose,
		EOddNo,
		ELabel1,
		ELabel2,
		ELabel4,
		ELabel5,
		// ]]] end generated region [Generated Contents]
		
		// add any user-defined entries here...
	    ETitleBar,
	    ECbaBar,
		ELastControl
		};
	};
				
#endif // SENDGOODSCONTAINER_H
